<?php
$this->pageTitle = $model->name;
?>
<style>
h1 {
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: none;
background-origin: padding-box;
border-bottom-color: #333;
border-bottom-style: none;
border-bottom-width: 0px;
border-collapse: separate;
border-left-color: #CCC;
border-right-color: #CCC;
border-top-color: #CCC;
color: #333;
display: block;
font-family: 宋体;
font-size: 14px;
font-style: normal;
font-variant: normal;
font-weight: bold;
height: 30px;
line-height: 23px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
overflow-x: visible;
overflow-y: visible;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 20px;
text-align: center;
white-space: normal;
width: 670px;
}

#main-content {
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: none;
background-origin: padding-box;
border-bottom-color: #333;
border-collapse: separate;
border-left-color: #333;
border-right-color: #333;
border-top-color: #333;
color: #333;
display: block;
font-family: 宋体;
font-size: 12px;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 18px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
overflow-x: visible;
overflow-y: visible;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
text-align: left;
white-space: normal;
width: 663px;
}

#bread {
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
background-attachment: scroll;
background-clip: border-box;
background-color: transparent;
background-image: none;
background-origin: padding-box;
border-bottom-color: #791132;
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: separate;
border-left-color: #333;
border-right-color: #333;
border-top-color: #333;
color: #333;
display: block;
font-family: 宋体;
font-size: 14px;
font-style: normal;
font-variant: normal;
font-weight: bold;
height: 32px;
line-height: 32px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
overflow-x: hidden;
overflow-y: hidden;
padding-bottom: 0px;
padding-left: 15px;
padding-right: 0px;
padding-top: 0px;
text-align: left;
white-space: normal;
width: 700px;
}

#main-content li {
background-image: url(/images/wordbg.gif);
background-position: bottom;
background-repeat: repeat-x;
text-align: left;
TEXT-INDENT: 0px;
LINE-HEIGHT: 25px;
HEIGHT: 25px;
overflow: hidden;
font-size: 12px;
display: block;
list-style-image: url(/images/li_arrow.gif);
list-style-position: outside;
}

.empty {
width:100%;
text-align:center;
display:block;
margin:30px 0px 0px;
font-size:18px;
color:red;
font-weight:bolder;
}
#ProductSortCssID{
  magin:0px 0px 0px 0px;
  padding:20px 0px 0px 0px;
  text-align:left;
}

/*多级分类菜单CSS，如无必要，无须改动*/
#pstMenu { 
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
}
#pstMenu, #pstMenu ul { 
list-style: none;
background: #F9F9F9;
font-weight: bold;
padding: 0px;
margin: 0px;
border: solid 1px #CCCCCC;
border-bottom: 0px;
width: 200px;
text-align: left;
}
#pstMenu ul ul{ 
border: solid 1px #CCCCCC;
border-bottom: 0px;
}
#pstMenu a { 
display: block;
width: 190px;
*width: 200px;
color: #333333;
text-decoration: none;
text-align: center;
border-bottom: solid 1px #CCCCCC;
text-align: left;
padding-left: 10px;
}

#pstMenu a:hover{ 
color: #fff;
}

#pstMenu a.selected{ 
background: url(../images/arrow.gif) no-repeat right 50%;
}

#pstMenu li { 
line-height: 35px;
position: relative;
}

#pstMenu li ul { 
position: absolute; /*去掉此行可以产生第二种排版效果*/
left: -999em;
width: 180px;
font-weight: normal;
margin: 0px;
padding: 0px;
}

#pstMenu li li { 
width: 180px;
}

#pstMenu li ul a { 
width: 180px;
w\idth: 180px;
padding: 0px 12px;
line-height: 35px;
text-align: left;
}

#pstMenu li ul ul { 
margin: 0px 0 0 150px;
}

#pstMenu li:hover ul ul,#pstMenu li.sfhover ul ul{ 
left: -999em;
color: #fff;
}

#pstMenu li:hover ul, #pstMenu li li:hover ul,#pstMenu li.sfhover ul, #pstMenu li li.sfhover ul{ 
left: auto;
}

#pstMenu li:hover ul,#pstMenu li.sfhover ul{ 
left: 200px;
top: 0px;
color: #fff;
}

#pstMenu li:hover, #pstMenu li.sfhover { 
background: #649be4;
}

* html #pstMenu li { 
float: left;
height: 1%;
}

* html #pstMenu li a { 
height: 1%; 
}

ul {
z-index:999;
}
</style>

<div style="width:270px;float:left;">
<div id="ProductSortCssID">

<ul id="pstMenu">

<?php 
$children = ProductCategory::model()->findAll(array('condition'=>'parent_id=1'));
foreach($children as $cat) {
    $list[] = $cat->id;
?>
<li>
    <?php echo CHtml::link($cat->name, array('productCategory/index','id'=>$cat->id));?>
    <ul>
        <?php 
        $subcat = ProductCategory::model()->findAll(array('condition'=>'parent_id='.$cat->id));
        foreach($subcat as $a) {
            echo "<li>".CHtml::link($a->name, array('productCategory/index','id'=>$a->id))."</li>";

        }
             ?>
    </ul>
</li>
<?php } ?>

</ul>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<script type="text/javascript">
sfHover = function() { 
    var sfEls = document.getElementById("pstMenu").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) { 
        sfEls[i].onmouseover=function() { 
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() { 
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

</script>
</div>
</div>
<div style="width:700px;float:right;margin:0px 0px 50px 0px;">
    <div id="bread">
    <a href="/">首页</a>
    >>
<?php
$father = ProductCategory::model()->findByPk($model->category_id); 
if($father) {
?>
    <a href="<?php echo Yii::app()->createUrl('productCategory/index', array('id'=>$model->category_id));?>"><?php echo $father->name;?></a>
    >>
<?php } ?>
<?php echo $model->name;?>
    </div>
    <div id="main-content">
<h1><?php echo $model->name; ?></h1>
<center><?php echo $model->date;?></center>

<p id="content">
<div style="clear:both;"></div>
<div>
<?php echo $model->intro; ?>
<?php echo $model->content;?>
<div style="clear:both;"></div>
</div>
</p>
    </div>
    <div style="clear:both;"></div>
</div>
